import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;

public class Prompt {
private ArrayList list;

    public ArrayList getList() {
        return list;
    }

    public void setList(ArrayList list) {
        this.list = list;
    }

    public float max() {
     //先排序再取最大值
        Collections.sort(list);
      float max=(float) list.get(list.size()-1);
        return max;
    }

    public float min() {
        Collections.sort(list);
        return (float) list.get(0);

    }

    public float avg() {
        list.remove(max());
        list.remove(min());
        float sum=0,avg=0;
        Iterator iterator=list.iterator();
        while (iterator.hasNext()){
            sum += (Float)iterator.next();

        }
avg=sum/list.size();
        return avg;
    }
}

